Colour-analyzer: a new dual colour model-based imaging tool to quantify plant disease

Background Despite major efforts over the last decades, the rising demands of the growing global population makes it of paramount importance to increase crop yields and reduce losses caused by plant pathogens. One way to tackle this is to screen novel resistant genotypes and immunity-inducing agents, which must be conducted in a high-throughput manner. Results Colour-analyzer is a free web-based tool that can be used to rapidly measure the formation of lesions on leaves. Pixel colour values are often used to distinguish infected from healthy tissues. Some programs employ colour models, such as RGB, HSV or L*a*b*. Colour-analyzer uses two colour models, utilizing both HSV (Hue, Saturation, Value) and L*a*b* values. We found that the a* b* values of the L*a*b* colour model provided the clearest distinction between infected and healthy tissue, while the H and S channels were best to distinguish the leaf area from the background. Conclusion By combining the a* and b* channels to determine the lesion area, while using the H and S channels to determine the leaf area, Colour-analyzer provides highly accurate information on the size of the lesion as well as the percentage of infected tissue in a high throughput manner and can accelerate the plant immunity research field.


Background
Over the past 50 years, the agricultural yield of most major crops has matched the rising demand of a growing worldwide population [1].However, recent statistics have reported a troubling plateau in total agricultural output, growing by no more than 1.6% annually [2].Current estimates suggest that by the year 2050, the global population will require between a 70% to 100% increase in crop production to meet the demands of a rapidly expanding population, reflecting social shifts towards plant-based products [3] and to keep up with the increase in living standards around the globe.
Plant disease still represents one of the major causes of crop loss in modern agriculture.Narrow genetic diversity of large-scale monocultures paired with close growth cycles enables the proliferation of disease leading to a near 30% loss in annual crop yield [4,5].The fungal necrotrophic pathogen, Botrytis cinerea, commonly known as gray mold, is a major concern for agriculture, causing widespread crop loss in a broad range of species and therefore has a destructive economic impact [6,7].Worldwide losses due to B. cinerea reach over $10 billion annually [8].B. cinerea causes necrosis through the secretion of toxins and enzymes to ultimately feed on dead host cells [9].Currently, chemical control through fungicides is the principal method of reducing B. cinerea diseases [10].However, when under selective pressure from fungicides, B. cinerea can rapidly develop resistance, therefore leading to failure of disease control [11].Furthermore, the possible negative impacts of fungicides on the environment and human health are of serious concern [12].Therefore, it is necessary to understand B. cinerea pathogenesis and form new strategies to control its effect on plants.
Research into plant-pathogen interactions provide an important avenue towards developing strategies to mitigate pathogen-related crop losses.Regardless of the approach taken to make crops more pathogen-resilient, either through the application of a novel compound or the engineering of a genetically altered plant species, an efficient and high throughput assay is instrumental to measure the outcome of an infection.Quantitative measurement of disease and resistance have been well established, including the measure of bacterial load [13], the measurement of reactive oxygen species (ROS) production [14], the quantification of marker genes, and the measurement of foliar disease symptoms.The measurement of foliar disease symptoms is one of the simplest forms of disease quantification, as it requires minimal training and can be relatively high throughput when compared to other methods.Depending on the pathogen, the development of foliar symptoms can range from the appearance of chlorotic tissue (as seen in the Pseudomonas syringae pv.tomato DC3000-Arabidopsis thaliana pathosystem) to the development of necrotic lesions (as seen in the interaction between Magnaporthe oryzae-Oryza sativa).
Image analysis tools exist that can facilitate fast and easy analysis of foliar disease symptoms, such as PIDIQ [15] for the development of pathogen induced leaf chlorosis.On the other hand, the quantification of fungal lesions (i.e., necrotic tissue) has primarily been done manually using image processing programs like ImageJ [16].ImageJ can be used to simply measure lesion diameters [17], to set grid areas to be counted [18] or even to approximate lesion area based on pixel values using the colour thresholding tool [19].While the use of image processing programs like ImageJ to quantify disease symptoms has been the standard in the field for many years, it is a relatively time-consuming process, and ill equipped for accurate measurements of irregularly shaped lesions.Other methods such as the use of the hardware YMJ-C smart leaf area meter [20] and the software Adobe Photoshop [21] have also been used but can be cost prohibitive.To this end we sought to develop a tool to rapidly quantify fungal lesions, and for this study we focused on those caused by Botrytis cinerea on tomato leaves.
Colour-analyzer is a free web-based tool that can be used to rapidly measure the formation of singular lesions on leaves.By measuring the area of the lesion along with the area of the leaf, Colour-analyzer is not only able to provide information on the size of the lesion, but also the percentage of infected tissue.This provides a quantitative assessment of disease symptoms in a high-throughput manner, allowing for the rapid quantification of disease development while maintaining high precision and accuracy.

Measurement of Botrytis lesions in Arabidopsis and tomato by conventional methods
To evaluate severity of disease, conventionally, necrotrophic lesions-such as the ones caused by B. cinereaare quantified by either manually measuring lesion diameters or lesion areas.These two methods are the simplest approaches to quantify B. cinerea symptoms, but, depending on the host plant, there are challenges.For example, in Arabidopsis, B. cinerea lesions develop symmetrical, and the lesion diameters correlates relatively well with disease severity.However, in tomato the symptoms are often asymmetrical and acentric; thus, standard methods to measure lesion diameters across the midvein can be inaccurate.Figure 1 A and 1B show conventional measurements (i.e., lesion diameter) of disease symptoms in Arabidopsis leaves infected with a drop of B. cinerea conidia.We compared untreated (buffer) control plants with plants treated with two agents (treatment 2 reduces the lesions, while treatment 1 does not).When the lesions were measured along the midvein of Arabidopsis leaves, treatment 2 showed significantly smaller lesions compared to the control as expected (Fig. 1A).This result was consistent with the measurements taken perpendicular to the midvein, also showing only treatment 2 as significantly different from the control (Fig. 1B).Thus, on Arabidopsis leaves, due to the formation of circular B. cinerea lesions, even measuring lesion diameters on different axes provided similar results.
On the other hand, when measuring the lesion diameters along the midvein of tomato leaves, treatment 2 again showed statistically significant decreased B. cinerea lesions, similarly to Arabidopsis (Fig. 1C).However, when the same lesions were measured for their diameters perpendicular to the midvein, no significant differences were observed among treatments (Fig. 1D).Treatment 2 no longer significantly reduced the symptoms.This illustrates that measuring lesion diameters can be extremely inconsistent if the axis of measurement is not defined properly and can be very susceptible to human error.
An alternative method is to measure the entire area of the lesions, which involves manually applying a grid of squares with known dimensions onto the lesion and counting the squares manually.This method is known as the square-counting method [22] and can accurately capture the disease severity and in principle is superior to measuring the diameter.However, this is extremely labor intensive and time-consuming, and thus is not suitable for a high throughput nor large-scale analysis.In addition, manual measurement of lesion areas or even lesion diameters are always at risk of human error and bias.Thus, more accurate methods are required for high throughput analysis in plants that develop asymmetric symptoms.

Colour models
Another way to quantify lesions is through manual or semi-automated processing methods, where pixel colour values are used to distinguish infected tissues from healthy tissues.These programs employ colour models, such as RGB, HSV or L*a*b* to assign a set of numerical values to each pixel of an image.The user can then define the threshold within these models to delineate what constitutes healthy versus infected tissues, which can be computed into a total number of pixels and then finally be converted to a relative area or a percentage of infected tissue.The choice of colour model can be imperative when trying to properly discern healthy from infected tissues, especially in a relatively high throughput fashion.The RGB (Red, Green, Blue) colour model is usually used for the display optimization of screens and lacks information regarding the illumination of an image [23].Unlike RGB, HSV (Hue, Saturation, Value) uses the Value portion to help discern changes in colour that occur from shadows or uneven illumination, thus providing a much more reliable way to process images when replicable illumination cannot be guaranteed.When using the RGB model, the separate channel values across a single colour panel with uneven illumination would be different, whereases when using the HSV model, the Hue component would be very similar for the whole panel, with the impact of the illumination primarily influencing the Value portion of the output.This is an important consideration when designing a software for user accessibility and versatility across a diverse set of plant pathosystems.However, the HSV model is limited in its Hue value, as it is a circular value plotted numerically from 0° to 360°, and thus for statistical purposes and computation, circular statistics must be used [24].In addition, the Hue is defined in 60° slices, in which the relationship between lightness, Value and chroma to R, G, B depends on each unique slice.This definition introduces discontinuities when we compare slices of the HSV model and can thus make it challenging to use when trying to set thresholds. Figure 2A shows the separation of the colour channels of the three models (RGB, HSV, L*A*B).Using the same image inputs, it was determined that using the a* b* values of the L*a*b* colour model provided the clearest distinction between infected and healthy tissue (compared to manual outline, Fig. 2C).This was compared against the use of the H and S values of the HSV colour model and the combination of all three RGB channels (Fig. 2B).However, it was also noted the H and S channels where sufficient in determining the leaf area (outline) from the background, most notably the saturation channel (Fig. 2A), which shows a strong contrast between the leaf and the uniform background that surrounds it.Therefore Colour-analyzer was built to use the a* and b* channels for determining the lesion area, while using the H and S channels to determine the leaf area.

Mathematical morphology
One of the prominent issues when using colour thresholding to isolate infected tissues is the unwanted selection of healthy tissue and background pixels.This exaggerates the perceived lesion area and may lead to un-reliable quantification of infected tissue, which may especially be an issue when comparing across samples that may have minute variations in basal leaf colouration (e.g., when dealing with mutants that may have altered basal leaf colour compared to wild type plants).To overcome this issue, Colour-analyzer uses morphological processing to remove as much background noise as possible.The program leverages a hole-filling algorithm, which is built on the assumption that the hole is the background region surrounded by an un-interrupted border of foreground elements [25].This means that the program will be forced to determine a lesion area that is a single complete region, rather than allowing the thresholding to isolate unwanted pixels (Fig. 3).This assumption works extremely well for isolating experimentally produced necrotic lesion areas, as they form as a single continuous space on the leaf, unlike bacterial specking or chlorosis, that may form in a disrupted pattern.The use of the Colour-analyzer program dramatically increases the accuracy of continuous lesion measurement and can reduce overestimation that typically occurs with colour thresholding (CT) models (Fig. 3).When comparing the use of the L*a*b* model with and without the morphological processing (mathematical morphology), it is also noted that the smaller lesions are more easily overestimated, largely due to the proportional impact of additional pixels to a smaller value.The main pixel area that are misidentified when the morphological processing is not employed are regions of shadow surrounding the leaf along with the midvein of the whole leaf, which is often a similar colouration to outer areas of the necrotic tissue (Fig. 3A, centre panel).Colour-analyzer completely reduce this noise and provide a consistently more accurate quantification of lesion area (Fig. 3A and B, bottom panels).A comparison of manual measurement and CA reveals a near perfect correlation (R 2 = 0.99) suggesting that there is little to no variation in accuracy between manual and CA measurements.On the other hand, the comparison between traditional CT and manual measurements shows a much larger variation, indicated both by the confidence interval and the R 2 value of 0.90.

Colour-analyzer workflow
Colour-analyzer (https:// vitto rioac comaz zi.github.io/ LeafS ize/) is a free web-based tool that quantifies the area of necrotic tissue following a fungal infection (Fig. 4).Currently, it is only supported through the free web browser Google Chrome, as it leverages several experimental features unique to Chrome (File system access API, offscreen canvas, PWA and background workers).This tool was developed for automating the measurement of lesions that develop following a detached leaf pathogen assay between Botrytis cinerea and Solanum lycopersicum.Therefore, some adjustment may be required to use this software for alternate pathosystems.
Following the infection assay, up to 8 leaves can be imaged at once, in which 2 leaves are placed in each quadrant of the image frame.Either a white or a black background can be used.We recommend using one treatment per image to ease the data sorting following lesion quantification.Photos are taken using a standard digital camera under white light, ideally with even illumination across all leaves.The application allows the selection of an upload folder, from which all captured images should be stored and processed individually.The user interface will prompt the user to select an example leaf region and example lesion region, using the mouse to paint over the region.This will allow the program to gauge what a* and b* value range is considered infected.The leaf area will be outlined to allow the user to get an output indicating the total leaf area in pixels, which can be used to determine the ratio of infected to uninfected tissue.For this function, the interface has a slider bar which corresponds to the HSV Hue and Saturation to determine the leaf area.Increasing the hue slider includes more elements into the selection, while increasing the saturation slider will exclude elements from the selection.After clicking the "preview" button, the program will output an outline of the infected tissue and the leaf, the user can adjust the parameters based on the program's interpretation.Once content with the selection, clicking "next" Fig. 4 Colour-analyzer workflow outline.Leaves are infected by conidial suspension and left for several days to develop symptoms.Leaves are then batch photographed, where up to 8 leaves can be photographed together.The web-based program can be run using the Chrome browser and will analyze each leaf individually, producing a CSV file in which each leaf will have both the lesion area and total area indicated.Statistics and graphing can then be done by the user will allow the program to process all the images using the cut-offs determined in the original image.In most cases, this should be sufficient to determine the lesion area of all images.The user can manually screen through each image to ensure accuracy and discard those that are incorrectly outlined.Then re-select the lesion area and adjust the sliders to adjust the selection.This can be repeated until all images have been processed correctly.The output is a single CSV file ordered by input image, which has been separated into its quadrants, containing both the leaf and lesion area.This data can then be used to compare lesion development across treatments.

Quantifying immunity
Induced systemic resistance (ISR) is a form of systemic immunity that is conferred through the interactions between ISR-inducing bacteria in the rhizosphere and the plant root.These interactions culminate in primed defence response in the above-ground tissues, largely reliant on the jasmonic acid-associated defence transcription factors, MYC2 and MYB72 [26,27].When testing a bacterial strain's ability to induce ISR, a pathogen assay is used to measure the level of disease protection, using lesion area as a proxy for the immune response.The gram-negative bacterium Pseudomonas defensor WCS374r is a known ISR inducing strain that reduces disease in a variety of plant species, such as radish, Eucalyptus, and rice [28][29][30] but until now, has yet to be experimentally shown to be an elicitor of ISR in Solanum lycopersicum [31].We pre-inoculated young tomato seedlings with either Pseudomonas defensor WCS374r, E. coli or 10 mM MgSO 4 control).E. coli was used a control treatment to mimic the addition of a high titer of bacteria to the rhizosphere.Plants were left to grow in soil for several weeks before leaves were detached, and challenge inoculated.A droplet of B. cinerea conidia was added to the midvein of each leaf and the leaves where sealed in petri dishes ensure high relative humidity and promote lesion development.Four-days post infection, images of the infected leaves were captured.Lesions on leaves from plants pre-treated with Pseudomonas defensor WCS374r were statistically significantly reduced compared to those from control, while E. coli pre-treated plants showed no significant change compared to the mock set (Fig. 5).In this proof-of-concept experiment, we show how this tool can be used to screen treatments that can help plants to defend themselves against disease.

Conclusions
Colour-analyzer is a free web-based tool for highthroughput screening of lesions on leaves.Here, we present its application for the agriculturally important fungal pathogen, Botrytis cinerea in tomato, but this tool can also be utilized for other pathosystems, and also for the quantification of discolourations or damage of leaves by abiotic stressors.It can provide very accurate leaf area measurements as well.The application is available at https:// github.com/ Vitto rioAc comaz zi/ LeafS ize and is designed to be improved or extended by users.Thus, we developed a new versatile imaging tool that is free for all plant researchers.

Bacterial strains and plant pre-treatment
Pseudomonas fluorescens WCS374r and Escherichia coli DH5α were grown in Lysogeny broth (LB) at 30 °C and 37 °C, respectively.Bacterial cultures were grown overnight in liquid cultures, before being spun down and resuspended in 10 mM MgSO 4 to an OD 600 of 0.1.Solanum lycopersicum cv.'Glamour' seeds were surface sterilized and germinated on ½ MS 1% sucrose agar plates for 5-days before being transferred to Jiffy-pellets (Jiffy Growing Solutions, Zwijndrecht, the Netherlands) Jiffypellets were soaked in 50 mL of bacterial inoculum each, for an hour before seed transfer.The plants were grown under 16 h of light and 8 h of darkness at 22 °C. 2 weeks later, Jiffy-pellets were transferred to larger pots filled with Sunshine Mix #1 to support the increased nutritional and spatial requirements during the maturation of the plants.

Botrytis cinerea culturing and challenge inoculation
The Botrytis cinerea MEE B191 isolate that was used for this experiment was provided by the Canadian Collection of Fungal Cultures (Agriculture and Agri-Food Canada, Ottawa, ON, Canada).The fungus was grown on potato dextrose agar (PDA) for 7 days at room temperature.B. cinerea spores (conidia) were collected and vortexed in Sabouraud Maltose Broth (SMB) before being passed through a Corning cell strainer with a pore size of 100 μm, which effectively removes large clumps of conidia and unwanted hyphae from the inoculum.The conidial concentration was adjusted to a final concentration of 2.5 X 10 5 conidia mL −1 .
The challenge inoculation was performed by placing a 10 μl droplet of the conidia solution in the midvein of detached leaves.A total of 16 leaves from four different plans were used per treatment.The inoculated leaves were kept in sealed petri dishes (2 per dish) lined with water-saturated sterile filter paper to maintain a high humidity environment.The petri dishes were kept in 24 h light conditions at room temperature for 3-4 days.

Image processing and analysis
All images were taken under controlled lighting conditions at a set height, to minimize image distortion and ensure maximal colour consistency.A black cloth was used as the background and a petri dish was added to each corner of the image frame, with a total of 8 leaves being imaged at a time.A ruler was placed within the image frame to allow for the conversion of pixel area to centimeters squared (cm 2 ) in the later steps.All images were stored in a single folder and the image files were re-named according to their treatment or condition.The program, available on Github and through the Chrome web browser, semi-automates the process of lesion quantification following the steps below.
Once the image set is loaded onto the program a single image can be used to establish the a* and b* values used to process the batch by using the cursor to select infected and healthy tissue.Using this approach, the upper and lower bounds of these values can be different between image sets or even between individual images, allowing for a fast and easy way to adjust thresholds between the sets.
The sliders at the top are used to help isolate the leaf region, which can also be modified between images.Once the program has finished processing the images, the user can identify images with improper selections, and the selection process can be re-preformed on this subset of images.This process can be repeated as many times as needed.Once all the images are accepted the program will output a CSV file which can be downloaded.The first column is the image name, which will be the file name and either Q0, Q1, Q2 or Q4 depending on the quadrant.The other columns will include the leaf area and the pathogen/lesion area.This data can be easily modified for statistical or graphing purposes.
Colour thresholding was done in Fiji [32] using the colour threshold tool found within Image > Adjust > Colour threshold.The colour space was set to Lab and the channel ranges set to L*: 0-255, a*: 119-139, and b*: 140-173.The area was then measured using the select function, which selects the region that falls within the given colour threshold parameters, followed by the measure function which generates the pixel number within that selection.Each leaf was measured independently using this method.

Fig. 1 B
Fig. 1 B. cinerea lesion quantification in Arabidopsis and tomato.Differences in B. cinerea lesion quantification when measuring the diameters horizontally or vertically in Arabidopsis and tomato leaves.Representative leaves with lesions are presented to illustrate how lesions were measured in each subgroup.A. Measuring lesions on Arabidopsis leaves vertically along the midvein.B. Measuring the same subset of leaves as in A., but using the horizontal diameter, perpendicular to the midvein.C. Measuring lesions on tomato leaves vertically along the midvein.D. Measuring the same subset of leaves as in C., but using the horizontal diameter, perpendicular to the midvein.Differences between treatment groups and mock were evaluated using a one-way ANOVA followed by a Dunnett's test post hoc.* ≤ 0.05, ** ≤ 0.01, *** ≤ 0.001.n = 6-8 The L*a*b* colour model uses L* to define the lightness of the object, a* for the ratio of red to green, while b* defines the ratio of blue to yellow.When plotted, these values provide a 3-dimensional overview, where the L* value acts as the Z axis while the a* and b* values form the X and Y axes respectively, with the sign (negative or positive) of the value inferring directionality towards the opposing colour.Because of this, the L*a*b* colour model is considered a linear model and becomes far superior in terms of computation and statistics compared to the circular nature of HSV.Using these two colour models that include an illumination value (HSV and L*a*b*) we tested their ability to discern the B. cinerea lesions on the leaves of tomato plants (Fig. 2).

Fig. 2
Fig. 2 Colour model comparison.A. Separation of the colour model channels that make up the RGB, HSV and L*a*b* colour models.B. Lesion identification using the three colour models within the Colour-analyzer program.C. The same lesion highlighted in 2B with manual annotations done in Fiji

Fig. 3
Fig. 3 Comparing colour thresholding with Colour-analyzer. A. Lesion identification through manual identification, traditional colour thresholding and Colour-analyzer.Manual identification was done using the polygon selection tool in Fiji.Colour thresholding was done in Fiji; L* 0-255, a* 119-139, and b* 140-173.B. Linear relationship between manual and colour thresholding lesion measurement and between manual and Colour-analyzer.Grey shaded area represents the 95% confidence interval

Fig. 5
Fig.5Quantifying the effect of an ISR-inducing strain on Botrytis lesion size in tomato.B. cinerea lesion area in plants pre-treated with either mock or bacterial solutions.The lesion areas were measured using Colour-analyzer, using pixel area as output.Differences between treatment groups and mock were evaluated using a one-way ANOVA followed by a Dunnett's test post hoc.* ≤ 0.05, ** ≤ 0.01.n = 16